﻿<%@ Page Language="C#" MasterPageFile="~/InventoryTracker/MasterPage.master" AutoEventWireup="true" CodeFile="SupplierMaster.aspx.cs" Inherits="InventoryTracker_Location" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="maincontent" Runat="Server">

<div id="projectreport">
        <a name="content_start0" id="content_start0"></a>
        <fieldset>
            <h2 class="none">
                Supplier Master</h2>
            <legend>Supplier Information</legend>
            <div class="formsection">
                Supplier</div>
            
            <table >
            <tr>
            <td>
            
            <asp:DropDownList ID="DdlSupplierName" runat="server" AutoPostBack="True" 
                    DataSourceID="SqlDSSupName" DataTextField="SupName" DataValueField="SupID" onselectedindexchanged="DdlSupplierName_SelectedIndexChanged"></asp:DropDownList>
            
                <asp:SqlDataSource ID="SqlDSSupName" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT [SupID], [SupName] FROM [SupplierMaster]">
                </asp:SqlDataSource>
            
            </td>
            
                <td>
                    <p style="height: 44px">
                        
                        <asp:Label ID="lblSupName" runat="server" Text="Supplier Name"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtSupName"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtSupName" runat="server"></asp:TextBox>
                        <br/>
                    </p>
                    <p style="height: 44px">
                        <asp:Label ID="lblSupStreet" runat="server" Text=" Street"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSupStreet"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <br/>
                        <asp:TextBox ID="txtSupStreet" runat="server"></asp:TextBox>
                        
                    </p>
                    <p style="height: 44px; width: 170px">
                        <asp:Label ID="lblSupCity" runat="server" Text=" City"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtSupCity"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <br/>
                        <asp:TextBox ID="txtSupCity" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                            ControlToValidate="txtSupCity" ErrorMessage="Enter only Characters." 
                            ValidationExpression="^[a-zA-Z\s.]*$"></asp:RegularExpressionValidator>
                    </p>
                    <p style="height: 44px">
                        <asp:Label ID="lblSupState" runat="server" Text=" State"> </asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtSupState"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <br/>
                        <asp:TextBox ID="txtSupState" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                            ControlToValidate="txtSupState" ErrorMessage="Enter only Characters." 
                            ValidationExpression="^[a-zA-Z\s.]*$"></asp:RegularExpressionValidator>
                    </p>
                    <p style="height: 44px">
                        <asp:Label ID="lblSupCountry" runat="server" Text="Country"></asp:Label>
                        
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtSupCountry"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <br/>
                        <asp:TextBox ID="txtSupCountry" runat="server"></asp:TextBox>
                        
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                            ControlToValidate="txtSupCountry" ErrorMessage="Enter only Characters." 
                            ValidationExpression="^[a-zA-Z\s.]*$"></asp:RegularExpressionValidator>
                        
                    </p>
                    <p style="height: 44px">
                        <asp:Label ID="lblSupZipCode" runat="server" Text="ZipCode"></asp:Label>
                        
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtSupZipCode"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <br/>
                        <asp:TextBox ID="txtSupZipCode" runat="server"></asp:TextBox>
                        
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator10" ControlToValidate="txtSupZipCode"
runat="server" ErrorMessage="Enter only Numbers." ValidationExpression="^[0-9]*$" 
                            SetFocusOnError="True"></asp:RegularExpressionValidator>
                        
                    </p>
            </td>
            <td>
                    <p style="top: 94px; left: 303px; position: absolute; height: 44px; width: 170px" >
                        <asp:Label ID="lblSupPhone" runat="server" Text="Phone No."></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtSupPhone"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <br/>
                            <asp:TextBox ID="txtSupPhone" runat="server"></asp:TextBox>
                            
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator6" ControlToValidate="txtSupPhone"
runat="server" ErrorMessage="Invalid Phone No:" ValidationExpression="^[0-9]*$" SetFocusOnError="True"></asp:RegularExpressionValidator>
                            
                    </p>
                    
                    <p style="height: 44px">
                        <asp:Label ID="lblSupFax" runat="server" Text="Fax"></asp:Label>
                        <br/>
                        <asp:TextBox ID="txtSupFax" runat="server"></asp:TextBox>
                        
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator7" ControlToValidate="txtSupFax"
runat="server" ErrorMessage="Invalid Fax No:" ValidationExpression="^[0-9]*$" SetFocusOnError="True"></asp:RegularExpressionValidator>
                    </p>
                    <p style="height: 44px; width: 170px;">
                        <asp:Label ID="lblSupEMailID" runat="server" Text="E-Mail"></asp:Label>
                        <br/>
                        <asp:TextBox ID="txtSupEMail" runat="server"></asp:TextBox>
                        <br/>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                        runat="server" ErrorMessage="Enter a valid E-Mail ID." 
                            ControlToValidate="txtSupEMail" 
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                        
                    </p>
                    <p style="height: 44px">
                        <asp:Label ID="lblSupLeadTime" runat="server" Text="LeadTime"></asp:Label>
                        <br/>
                        <asp:TextBox ID="txtSupLeadTime" runat="server"></asp:TextBox>
                        
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator8" ControlToValidate="txtSupLeadTime"
runat="server" ErrorMessage="Enter only Numbers." ValidationExpression="^[0-9]*$" 
                            SetFocusOnError="True"></asp:RegularExpressionValidator>
                    </p>
                    
                    
                    <p style="height: 44px">
                        <asp:Label ID="lblStatus" runat="server" Text="Status:" Font-Underline="True"></asp:Label>
                        
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="RDbtnListSupp"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <br/>
                        
                      <asp:RadioButtonList ID="RDbtnListSupp" runat="server"                     
                           style="top: 345px; left: 295px; position: absolute; height: 50px; width: 75px" 
                           CausesValidation="True">
                     <asp:ListItem>Active</asp:ListItem>
                     <asp:ListItem>Inactive</asp:ListItem>
                     </asp:RadioButtonList>
                  </p>
        
                  </td>
                  </tr>
                  </table>
            
            <asp:Label ID="lblWarn" runat="server" Text="* Required Fields" 
                ForeColor="Red"></asp:Label>
            <div class="formsection">
                <asp:Button ID="btnSubmit" runat="server"  Text="Submit" 
                    onclick="btnSubmit_Click" style="width: 61px" />
                    <asp:Button ID="btnSupNew" runat="server" Text="New" 
                    onclick="btnSupNew_Click1"></asp:Button>
                    <asp:Button ID="btnSupDelete" runat="server" Text="Delete" 
                    onclick="btnSupDelete_Click1"></asp:Button>
                    <asp:Button ID="btnSupEdit" runat="server" Text="Edit" 
                    onclick="btnSupEdit_Click"></asp:Button>
                    <asp:Button ID="btnSupUpdate" runat="server" Text="Update" 
                    onclick="btnSupUpdate_Click" 
                    ></asp:Button>
                    
                    <asp:Label ID="lblResult" runat="server" Text=""></asp:Label>
                    
            </div>
        </fieldset>
    </div>



</asp:Content>

